"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x4770BA40, 0x4770BAC0, 0x0030EA4F, 0x00004770, 0x4603B510, 0x4CEB48EA, 0xBF006160, 0x690048E9,
        0x0001F000, 0xD1F92800, 0x4CE648E7, 0x48E76060, 0x48E36060, 0x60204CE6, 0x48E5BF00, 0x68001F00,
        0x0001F000, 0xD1F82800, 0x4CE148DF, 0x60203C10, 0x4CDC48DE, 0x0104F8C4, 0x69C04620, 0xBD102000,
        0x48D84601, 0xF04068C0, 0x4AD60001, 0x48D860D0, 0x68003808, 0x0001F040, 0x010CF8C2, 0x47702000,
        0x48D0BF00, 0xF0006900, 0x28000001, 0x48CCD1F9, 0x614849CC, 0x68C04608, 0x0001F020, 0x460860C8,
        0xF04068C0, 0x60C80008, 0x68C04608, 0x0020F040, 0xBF0060C8, 0x690048C3, 0x0001F000, 0xD1F92800,
        0x68C048C0, 0x0008F020, 0x60C849BE, 0x48C0BF00, 0x68001F00, 0x0001F000, 0xD1F82800, 0x49BC48B8,
        0x48B86008, 0x010CF8D0, 0x0001F020, 0xF8C149B5, 0x4608010C, 0x010CF8D0, 0x0008F040, 0x010CF8C1,
        0xF8D04608, 0xF040010C, 0x49B10020, 0x60083908, 0x48AFBF00, 0x68001F00, 0x0001F000, 0xD1F82800,
        0x380848AB, 0xF0206800, 0x49A60008, 0x010CF8C1, 0x47702000, 0xF3C14601, 0xF1B13246, 0xD3366F00,
        0x6F01F1B1, 0x489FD233, 0x4B9D6940, 0x4B9D4318, 0xBF006158, 0x6900489B, 0x0001F000, 0xD1F92800,
        0x68C04898, 0x0001F020, 0x60D84B96, 0x68C04618, 0xEA432304, 0x43181382, 0x60D84B92, 0x68C04618,
        0x0020F040, 0xBF0060D8, 0x6900488E, 0x0001F000, 0xD1F92800, 0x68C0488B, 0x0004F020, 0x60D84B89,
        0x69004618, 0x0001F000, 0x2001B3E8, 0x48884770, 0x4B836800, 0x4B834318, 0x0114F8C3, 0x4884BF00,
        0x68001F00, 0x0001F000, 0xD1F82800, 0x38084880, 0xF0206800, 0x4B7B0001, 0x010CF8C3, 0x3808487C,
        0x23046800, 0x1382EA43, 0x4B764318, 0x010CF8C3, 0xF8D04618, 0xF040010C, 0xF8C30020, 0xBF00010C,
        0x1F004873, 0xF0006800, 0x28000001, 0x4870D1F8, 0x68003808, 0x0004F020, 0xF8C34B6A, 0x486C010C,
        0x68001F00, 0xE004E000, 0x0001F000, 0x2001B108, 0x2000E7BC, 0xB5F0E7BA, 0x46164603, 0x4635461A,
        0xBF002400, 0x6900485F, 0x0001F000, 0xD1F92800, 0x4F5C485B, 0xBF006178, 0x1F00485D, 0xF0006800,
        0x28000001, 0x4856D1F8, 0x60384F59, 0x4855E0A2, 0xF02068C0, 0x4F530001, 0x463860F8, 0xF04068C0,
        0x60F80002, 0x38084852, 0xF0206800, 0xF8C70001, 0x4638010C, 0x010CF8D0, 0x0002F040, 0x010CF8C7,
        0xD30C2910, 0xE0062400, 0x6868682F, 0x60506017, 0x32083508, 0x2C021C64, 0x3910DBF6, 0x2400E028,
        0xF815E004, 0xF8020B01, 0x1C640B01, 0xD3F8428C, 0xE0032400, 0xF80220FF, 0x1C640B01, 0x0010F1C1,
        0xD8F742A0, 0x6F00F1B3, 0xF1B3D309, 0xD2066F01, 0x68C04834, 0x0040F040, 0x60F84F32, 0x4834E007,
        0x68003808, 0x0040F040, 0xF8C74F2E, 0x2100010C, 0xBF00BF00, 0xF3BFBF00, 0xBF008F4F, 0xBF00BF00,
        0x6F00F1B3, 0xF1B3D30A, 0xD2076F01, 0x4825BF00, 0xF0006900, 0x28000001, 0xE007D1F9, 0x4824BF00,
        0x68001F00, 0x0001F000, 0xD1F82800, 0x6900481D, 0x4F1F2000, 0x683F1F3F, 0xB1B04300, 0x6F00F1B3,
        0xF1B3D309, 0xD2066F01, 0x68C04816, 0x0002F020, 0x60F84F14, 0x4816E007, 0x68003808, 0x0002F020,
        0xF8C74F10, 0x2001010C, 0xF1B3BDF0, 0xD3096F00, 0x6F01F1B3, 0x480BD206, 0xF02068C0, 0x4F090002,
        0xE00760F8, 0x3808480A, 0xF0206800, 0x4F050002, 0x010CF8C7, 0xF47F2900, 0x2000AF5A, 0x0000E7E4,
        0x0FAF0000, 0x52002000, 0x45670123, 0xCDEF89AB, 0x52002114, 0x00000000
    ],

    'pc_Init'            : 0x20000031,
    'pc_UnInit'          : 0x20000081,
    'pc_EraseSector'     : 0x20000155,
    'pc_ProgramPage'     : 0x20000257,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x200000A1,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20001000,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x000003D4,
    'rw_start'           : 0x000003D4,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x000003D8,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x08000000,
    'flash_size'         : 0x00200000,
    'flash_page_size'    : 0x00000400,
}
